<template>
    <div>
        <h1>{{ msg }}</h1>
        <h3>姓名：{{ name }}</h3>
        <h3>年龄：{{ age }}</h3>
        <button @click="printInfo">打印用户信息</button>
        <br /><br />
        <button @click="a">获取哪里的a方法？</button>
    </div>
</template>

<script>
import { mix1 } from '../mixin.js';
import { mix2 } from '../mixin.js';
import { mix3 } from '../mixin.js';
export default {
    name: 'User',
    data() {
        return {
            msg: '用户信息',
            name: '张三',
            age: 20
        }
    },
    mounted() {
        console.log('User mounted.......')
        console.log('通过插件扩展的counter：' + this.counter)
    },
    // methods: {
    //     printInfo() {
    //         console.log(this.name, "，", this.age)
    //     }
    // },

    // 混入
    mixins: [mix1, mix2, mix3]

}
</script>